﻿{extend name="$_tpl_public_layout_danceadmin"/}


{block name="breadcrumb"}
<ol class="breadcrumb">
	<li class="breadcrumb-item"><a href="{:url('admin/index/index')}">{:config('system.site_title')}</a></li>
	<li class="breadcrumb-item"><a href="{:url('mobmall_manage/config/index')}">{$sideName}</a></li>
</ol>
{/block}


{block name="pageheader"}
{$sideName}
{/block}


{block name="content"}
<div class="card mb-3">
	<div class="card-body">
		<form method="post" action="{:url('mobmall_manage/config/doSet')}" enctype="multipart/form-data" class="form-horizontal J_ajaxForm">
			<div class="form-group row">
				<label class="col-sm-2 control-label">温馨提示</label>
				<div class="col-sm-5">
					<input type="text" name="data[reminder]" value="{$info['reminder']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">是否开启文章评论审核</label>
				<div class="col-sm-5">
					<?php echo isOpenRadioHtmlB('data[article_comment_check]', $info['evaluation_check']); ?>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">开启默认城市</label>
				<div class="col-sm-5">
					<?php echo isOpenRadioHtmlB('data[is_default_city]', $info['is_default_city']); ?>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">设置默认城市</label>
				<div class="col-sm-5">
					<div class="city-picker-select"></div>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">余额展示名称</label>
				<div class="col-sm-5">
					<input type="text" name="data[balance_name]" value="{$info['balance_name']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">金币展示名称</label>
				<div class="col-sm-5">
					<input type="text" name="data[gold_name]" value="{$info['gold_name']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">金币兑换比率</label>
				<div class="col-sm-5">
					<input type="text" name="data[gold_rate]" value="{$info['gold_rate']}" class="form-control" />
				</div>
				<div class="col-sm-5 help-block">10金币=1人民币</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">cardid</label>
				<div class="col-sm-5">
					<input type="text" name="data[cardid]" value="{$info['cardid']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<h3 class="form-lighter">商户相关</h3>
			<div class="form-group row">
				<label class="col-sm-2 control-label">是否开启编辑审核</label>
				<div class="col-sm-5">
					<?php echo isOpenRadioHtmlB('data[vip_edit_check]', $info['vip_edit_check']); ?>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<h3 class="form-lighter">订单相关</h3>
			<div class="form-group row">
				<label class="col-sm-2 control-label">支付方式</label>
				<div class="col-sm-5">
					<label class="checkbox-inline"><input type="checkbox" name="allow_pay_method[]" value="1" {$info['is_alipay'] == 1 ? 'checked' : ''} />支付宝</label>
					<label class="checkbox-inline"><input type="checkbox" name="allow_pay_method[]" value="2" {$info['is_wxpay'] == 1 ? 'checked' : ''} />微信</label>
					<label class="checkbox-inline"><input type="checkbox" name="allow_pay_method[]" value="4" {$info['is_balance'] == 1 ? 'checked' : ''} />余额支付</label>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">订单支付超时时间</label>
				<div class="col-sm-5">
					<input type="text" name="data[pay_over_time]" value="{$info['pay_over_time']}" class="form-control" />
				</div>
				<div class="col-sm-5 help-block">单位：秒，自己换算一下，建议1800</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">订单收货超时时间</label>
				<div class="col-sm-5">
					<input type="text" name="data[receive_over_time]" value="{$info['receive_over_time']}" class="form-control" />
				</div>
				<div class="col-sm-5 help-block">单位：秒，自己换算一下，建议604800</div>
			</div>
			<h3 class="form-lighter">通知相关</h3>
			<div class="form-group row">
				<label class="col-sm-2 control-label">微信模板通知是否开启</label>
				<div class="col-sm-5">
					<?php echo isOpenRadioHtmlB('data[is_tmplmsg_open]', $info['is_tmplmsg_open']); ?>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">短信通知是否开启</label>
				<div class="col-sm-5">
					<?php echo isOpenRadioHtmlB('data[is_mobsms_open]', $info['is_mobsms_open']); ?>
				</div>
				<div class="col-sm-5 help-block">包含下单通知给商家</div>
			</div>
			<div class="clearfix form-actions">
				<div class="offset-md-2 col-sm-10">
					<button type="submit" class="btn btn-primary btn-sm J_ajaxSubmit">保存</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}


{block name="script"}
<!-- 上传图片展示 -->
<script type="text/javascript" src="__STATIC__/dancewidgets/uploadPreview/uploadPreview.js"></script>

<!-- 省市选择 -->
<script type="text/javascript" src="__STATIC__/plugins/cityPicker/js/citydata.min.js"></script>
<script type="text/javascript" src="__STATIC__/plugins/cityPicker/js/cityPicker-2.0.3.js"></script>
<script type="text/javascript">
var selector1 = $(".city-picker-select").cityPicker({
	dataJson: cityData,
	renderMode: false,
	autoSelected: true,
	level: 3,
	storage: false,
	onChoiceEnd: function() {
		console.log(this.values)
	}
});
//设置城市
selector1.setCityVal('{$info['province']}, {$info['city']}, {$info['district']}');
</script>
{/block}